export const increment_api = (count) => {
  return { type: "increment", count };
};

export const decrement_api = (count) => {
  return { type: "decrement", count };
};

export const incrementAsync_api = (count) => {
  // 在异步里面,这个dispatch才是真正触发reducer的dispatch
  return (dispatch) => {
    setTimeout(() => {
      dispatch(increment_api(count));
    }, 2000);
  };
};
